package dhtpdud;

public class Java_homework_3_5 {
	public static void main ( String[] args ) {
		
		int i, j;
		int result;
		
		for(i=1; i<=10; i++) {
			result = 1;
			
			for (j=i; j>=1; j--) {
				result *= j;
			}
			
			System.out.println(i+"! = "+result);
		}
	}
}
